package cn.ekuma.odbo.mobile.category.ui

import androidx.recyclerview.widget.RecyclerView
import com.gitee.wsl.struct.category.CategoryItemWarp.Companion.CATEGORY_ITEM_TYPE_FILE


open class SampleCategoryItemAdapter( onTreeNodeListener:OnTreeNodeListener) :AbstractCategoryItemAdapter(onTreeNodeListener){

    val dirBinder = DirectoryNodeBinder()
    val fileBinder = FileNodeBinder()

    override fun createViewHolderBinder( viewType: Int): TreeViewBinder<RecyclerView.ViewHolder> {
       return when(viewType){
           CATEGORY_ITEM_TYPE_FILE ->{
                fileBinder
            }
            else->{
                dirBinder
            }
        } as TreeViewBinder<RecyclerView.ViewHolder>
    }

}